package com.dev.drawweb.model.mapper;

import com.dev.drawweb.model.pojo.Draw;
import com.dev.drawweb.model.pojo.Student;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface DrawMapper {
    List<Map> getDrawsByStuID(int id);

    List<Draw> getDrawsByUserID(@Param("id") int id);

    List<Student> getStudentsResByDrawName(@Param("drawName") String drawName);

    Integer getDrawByIdAndName(Draw draw);

    int doStuDraw(Map<String,Object> map);

    int reDrawByDrawName(@Param("drawName") String drawName);

    int addDraw(Draw draw);

    int addStudentToDraw(Draw drawEle);

    int delFromDraw(Draw draw);

    int delFromUser(Draw draw);

    int upDateStuScore(Map<String,Object> map);
}
